package com.hptpd.questionnairesurvey.controller.admin;

import com.google.common.collect.Maps;
import com.hptpd.questionnairesurvey.component.Result;
import com.hptpd.questionnairesurvey.controller.base.BaseController;
import com.hptpd.questionnairesurvey.service.IQyWeiXinApiService;
import com.hptpd.questionnairesurvey.service.IUserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * \* Created with IntelliJ IDEA.
 * \* Date: 2019-07-16 09:15
 * \*
 * \* Description:
 * \
 *
 * @author waiterlong
 */
@RestController
@RequestMapping("/api/admin")
public class UserController extends BaseController {
    @Resource(name = "iUserService")
    private IUserService iUserService;

    @Resource(name = "iQyWeiXinApiService")
    private IQyWeiXinApiService iQyWeiXinApiService;

    /**
     * 获取用户机构树
     * @return Object
     */
    @RequestMapping(value = "/user/tree", method = RequestMethod.GET)
    public Result getUserTree(){
        Map<String, Object> paramMap = Maps.newHashMap();
        return iUserService.getUserTree(paramMap);
    }
}
